package com.healthy.mapper;

import com.healthy.entity.Returnvisit;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ReturnvisitMapper {
    //    查询所有
    @Select("select * from t_returnvisit")
    List<Returnvisit> culist();

    //    添加
    @Insert("insert into t_returnvisit (name, type, content,doctor) values ( #{returnvisit.name}, #{returnvisit.type}, #{returnvisit.content}, #{returnvisit.doctor})")
    int cuInsert(@Param("returnvisit") Returnvisit returnvisit);

    //删除
    @Delete("delete from t_returnvisit where id = #{id}")
    int cuDeleteByid(int id);

    //修改
    @Update("update t_returnvisit set name = #{name}, type = #{type}, content = #{content}, doctor = #{doctor} where id = #{id}")
    int cuUpdateByid(@Param("id") int id,@Param("name") String name,@Param("type") String type,@Param("content") String content,@Param("doctor") String doctor);
}
